package com.czxy.client;

import com.czxy.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author 张青卯
 */
@FeignClient(value = "web-service",fallback = UserClientFallback.class)
public interface UserClient {

    /**
     * findUserByMobile 远程调用登录接口
     * @param mobile 手机号
     * @param password 密码
     * @return user
     */
    @GetMapping("query")
    ResponseEntity<User> findUserByMobile(@RequestParam("mobile") String mobile,@RequestParam("password") String password);

}
